export const logFormConfin = [
  {
    label: "一、事件监测",
    formItem: [
      {
        prop: "eventMonitor",
        placeholder: "请输入"
      },
      {
        prop: "eventMonitorTitle",
        placeholder: "请输入",
        class: "form-title"
      }
    ]
  },
  {
    label: "二、保电工作",
    formItem: [
      {
        prop: "powerWork",
        placeholder: "请输入"
      },
      {
        prop: "powerWorkTitle",
        placeholder: "请输入",
        class: "form-title"
      }
    ]
  },
  {
    label: "三、资源核查情况",
    formItem: [
      {
        prop: "resourceVerification",
        placeholder: "请输入"
      },
      {
        prop: "resourceVerificationTitle",
        placeholder: "请输入",
        class: "form-title"
      }
    ]
  },
  {
    label: "四、通信测试",
    formItem: [
      {
        prop: "communicateTest",
        placeholder: "请输入"
      },
      {
        prop: "communicateTestTitle",
        placeholder: "请输入",
        class: "form-title"
      }
    ]
  },
  {
    label: "五、日常操练情况",
    formItem: [
      {
        prop: "dailyExercise",
        placeholder: "请输入"
      },
      {
        prop: "dailyExerciseTitle",
        placeholder: "请输入",
        class: "form-title"
      }
    ]
  },
  {
    label: "六、日报填报情况",
    formItem: [
      {
        prop: "dailyReportData",
        placeholder: "请输入"
      },
      {
        prop: "dailyReportDataTitle",
        placeholder: "请输入",
        class: "form-title"
      }
    ]
  },
  {
    label: "七、值班重要事项",
    formItem: [
      {
        prop: "materialNotes",
        placeholder: "请输入"
      },
      {
        prop: "materialNotesTitle",
        placeholder: "请输入",
        class: "form-title"
      }
    ]
  },
  {
    label: "八、预警处置",
    formItem: [
      {
        prop: "warningDeal",
        placeholder: "请输入"
      },
      {
        prop: "warningDealTitle",
        placeholder: "请输入",
        class: "form-title"
      }
    ]
  },
  {
    label: "九、一般记事",
    formItem: [
      {
        prop: "generalChronicles",
        placeholder: "请输入"
      },
      {
        prop: "generalChroniclesTitle",
        placeholder: "请输入",
        class: "form-title"
      }
    ]
  }
];
export const logFormRules = {
  eventMonitor: [
    { required: true, message: "请输入", trigger: "blur" }

  ],
  eventMonitorTitle: [
    { required: true, message: "请输入", trigger: "blur" }

  ],
  powerWork: [
    { required: true, message: "请输入", trigger: "blur" }

  ],
  powerWorkTitle: [
    { required: true, message: "请输入", trigger: "blur" }
  ],
  resourceVerification: [
    { required: true, message: "请输入", trigger: "blur" }

  ],
  resourceVerificationTitle: [
    { required: true, message: "请输入", trigger: "blur" }

  ],
  communicateTest: [
    { required: true, message: "请输入", trigger: "blur" }

  ],
  communicateTestTitle: [
    { required: true, message: "请输入", trigger: "blur" }

  ],
  dailyExercise: [
    { required: true, message: "请输入", trigger: "blur" }

  ],
  dailyExerciseTitle: [
    { required: true, message: "请输入", trigger: "blur" }

  ],
  dailyReportData: [
    { required: true, message: "请输入", trigger: "blur" }
  ],
  dailyReportDataTitle: [
    { required: true, message: "请输入", trigger: "blur" }
  ],
  materialNotes: [
    { required: true, message: "请输入", trigger: "blur" }
  ],
  materialNotesTitle: [
    { required: true, message: "请输入", trigger: "blur" }
  ],
  warningDeal: [
    { required: true, message: "请输入", trigger: "blur" }
  ],
  warningDealTitle: [
    { required: true, message: "请输入", trigger: "blur" }
  ],
  generalChronicles: [
    { required: true, message: "请输入", trigger: "blur" }
  ],
  generalChroniclesTitle: [
    { required: true, message: "请输入", trigger: "blur" }
  ]
};
export const dailyFormConfin = [
  {
    label: "一、总体情况",
    prop: "eventMonitor",
    placeholder: "请输入"
  },
  {
    label: "二、重要事项",
    prop: "importantNotes",
    placeholder: "请输入"
  },
  {
    label: "三、安全生产情况",
    prop: "safeProduct",
    placeholder: "请输入"
  },
  {
    label: "四、值班员日常工作情况",
    prop: "resourceVerification",
    placeholder: "请输入"
  },
  {
    label: "五、供电保障情况",
    prop: "powerWork",
    placeholder: "请输入"
  },
  {
    label: "六、预警及响应情况",
    prop: "warningDeal",
    placeholder: "请输入"
  },
  {
    label: "七、值班重要事项",
    prop: "materialNotes",
    placeholder: "请输入"
  },
  {
    label: "八、其他情况说明",
    prop: "other",
    placeholder: "请输入"
  }
];
export const dailyFormRules = {
  eventMonitor: [
    { required: true, message: "请输入", trigger: "blur" }

  ],
  importantNotes: [
    { required: true, message: "请输入", trigger: "blur" }

  ],
  safeProduct: [
    { required: true, message: "请输入", trigger: "blur" }
  ],
  resourceVerification: [
    { required: true, message: "请输入", trigger: "blur" }

  ],
  powerWork: [
    { required: true, message: "请输入", trigger: "blur" }

  ],
  warningDeal: [
    { required: true, message: "请输入", trigger: "blur" }

  ],
  materialNotes: [
    { required: true, message: "请输入", trigger: "blur" }
  ],
  other: [
    { required: true, message: "请输入", trigger: "blur" }
  ]
};
export const getExistingNum = (item) => {
  const { dispatchExisting = 0, opExisting = 0, marketingExisting = 0, constructionExisting = 0 } = item;
  return dispatchExisting * 1 + opExisting * 1 + marketingExisting * 1 + constructionExisting * 1;
};
export const getAddNum = (item) => {
  const { dispatchNewlyIncreased = 0, opNewlyIncreased = 0, marketingNewlyIncreased = 0, constructionNewlyIncreased = 0 } = item;
  return dispatchNewlyIncreased * 1 + opNewlyIncreased * 1 + marketingNewlyIncreased * 1 + constructionNewlyIncreased * 1;
};

export const titleConfig = [
  {
    title: "值班日志",
    name: "1",
    slot: "slot1"
  },
  {
    title: "填报信息",
    name: "2",
    slot: "slot2"
  }
];
export const titleConfigApprover = [
  {
    title: "值班日志",
    name: "1",
    slot: "slot1"
  },
  {
    title: "填报信息",
    name: "2",
    slot: "slot2"
  },
  {
    title: "审批信息",
    name: "3",
    slot: "slot3"
  }
];
export const getInfection = (data) => {
  return [{// 确诊  治愈  疑似
    // 电网调度
    id: data[0].id,
    unit: data[0].unit,
    dispatchNewlyIncreasedDiagnosis: data[0].dispatchExisting,
    dispatchExistingDiagnosis: data[0].dispatchNewlyIncreased,
    dispatchNewlyIncreasedCure: data[1].dispatchNewlyIncreased,
    dispatchExistingCure: data[1].dispatchExisting,
    dispatchNewlyIncreasedSuspected: data[2].dispatchNewlyIncreased,
    dispatchExistingSuspected: data[2].dispatchExisting,
    // 运维检修
    opNewlyIncreasedDiagnosis: data[0].opNewlyIncreased,
    opExistingDiagnosis: data[0].opExisting,
    opNewlyIncreasedCure: data[1].opExisting,
    opExistingCure: data[1].opNewlyIncreased,
    opNewlyIncreasedSuspected: data[2].opExisting,
    opExistingSuspected: data[2].opNewlyIncreased,
    // 营销服务
    marketingNewlyIncreasedDiagnosis: data[0].marketingNewlyIncreased,
    marketingExistingDiagnosis: data[0].marketingExisting,
    marketingNewlyIncreasedCure: data[1].marketingExisting,
    marketingExistingCure: data[1].marketingNewlyIncreased,
    marketingNewlyIncreasedSuspected: data[2].marketingExisting,
    marketingExistingSuspected: data[2].marketingNewlyIncreased,
    // 电网建设
    constructionNewlyIncreasedDiagnosis: data[0].constructionNewlyIncreased,
    constructionExistingDiagnosis: data[0].constructionExisting,
    constructionNewlyIncreasedCure: data[1].constructionExisting,
    constructionExistingCure: data[1].constructionNewlyIncreased,
    constructionNewlyIncreasedSuspected: data[2].constructionExisting,
    constructionExistingSuspected: data[2].constructionNewlyIncreased
  }];
};
